<!--{template admin/header}-->
<body id="homepage">
    <div id="breadcrumb">
        <ul>
            <li><img src="static/img/icons/icon_breadcrumb.png"
                     alt="Location" /></li>
            <li><strong>位置:</strong></li>
            <li><a href="admin.php">主页</a> - 话题点滴</li>
        </ul>
    </div>
    <div id="rightside" >
        <div class="contentcontainer">
            <div class="headings altheading">
            <h3><span class="nav_left">话题点滴</span></h3>
			  </div>
                <div class="paper-head"> 
                <p>
                	<ul class="inline">	
						<li>
							<form method="get" class="form-inline" role="form" action="admin.php">                      		                   	
		                        <select name='length' class="span2" >      
			                   		<option value="50"  {$page_len[50]}>每页显示50条</option>                		
			                        <option value="100" {$page_len[100]}>每页显示100条</option>                       
				                </select>                     
		                        <input type="hidden" name="ac" value="diaryTopicOfficial" />  
		                        <input type="hidden" name="op" value="getDiarysByTopic" />    
		                         <input type="hidden" name="gid" value="{$info['topic_id']}" />                  
                       			<button type="submit" class="btn btn-large" name="sub"> 点击查询 </button>
                   		    </form>           
						</li>
						</ul> 
				</p>						  								    	  
				</div>
      		    
      
      		  <div class="contentbox">
                <table width="100%" class="table table-striped">
                    <thead>
                        <tr>
                        	<th>作者</th>
                        	<th style="width:30%;">内容</th>   
                            <th>评论</th>                                         
                            <th>喜欢</th>                                         
                            <th>查看</th>
                            <th>操作</th>                        
                        </tr>
                    </thead>
                    
                    <tbody>
                  	<!--{if $list != '' }-->
                  			 <!--{loop $list $value}-->
                  			 	<tr>
                  			 	<td><a href="admin.php?ac=user_profile&uid={$value[detail][uid]}"><!--{$value[detail][nickname]}--></a></td>    			 	
                  			 	<td><!--{$value[detail][abbreviation]}--></td>
                  			 	<td><!--{$value[detail][commentTimes]}--></td>
                  			 	<td><!--{$value[detail][likeTimes]}--></td>
                  			 	<td><!--{$value[detail][viewTimes]}--></td>
                  			 	<td><button class="btn delete"  data-bodyid={$value[detail][bodyId]} data-uid={$value[detail][uid]}>删除</button></td>
                  			 	</tr>                
                  			 <!--{/loop}-->					
                  	<!--{/if}-->
                    </tbody>
                
                </table>                              
                <div style="clear: both;"></div>
            </div>  		   
             <div class="extrabottom">
                    <div class="bulkactions">
                        <ul class="pagination">
                            <!--{if $prevpurl!=''}-->
                            <li class="text"><a href="{$firstpurl}" title="">首页</a></li>
                            <li class="text"><a href="{$prevpurl}" title="">上一页</a></li>
                            <!--{/if}-->                       
                            <li class="text"><a href="{$nextpurl}" title="">下一页</a></li>
                        </ul>
                        <div style="clear: both;"></div>
                    </div>
             </div>
        </div>
    </div>
  
    <!--{template admin/leftside}-->
    <!--{template admin/footer}-->
     
     <script type="text/javascript" language="javascript">
    
     		$('.delete').click(function(){
     				var sta={1:'删除成功~',0:'删除失败~'}
       				$.ajax({
       					type:'GET',
       					data:{'bodyid':$(this).data('bodyid'),'uid':$(this).data('uid')},
       					url :'admin.php?ac=diaryTopicOfficial&op=removeDiary',
       					dataType:'json',
       					success:function(data){
       						if(data == 1){
       							alert(sta[data]);
       						 location.reload(); 
       						}
       						
       					}
       				})
       		})
    	
   
     </script>
    